Auth()
var type = globalFun.GetQueryString('type');
var searchlist = sessionStorage.getItem('searchlist');
searchlist = JSON.parse(searchlist);
if(type==1){
	jiegou(searchlist)
}else if(type==2){
	jiegou1(searchlist)
}
//活动数据渲染
function jiegou(content) {
	var ss = '';
	for(var i = 0; i < content.length; i++) {
		ss += '<div class="searchactive_xq" data-id="' + content[i].id + '">'
		ss += '<img class="img1" src="' + content[i].imgUrl + '"/>'
		ss += '<dl class="dl_xq">'
		ss += '<dt>' + content[i].title + '</dt>'
		ss += '<dd class="address">' + content[i].teamName + '</dd>'
		ss += '<dd class="timer"><img src="img/icon_sj.png"/><span>' + content[i].createdTime + '</span></dd><dd class="timer1"><img class="img2" src="img/icon_ll.png"/><span>' + content[i].browserAmount + '</span><img class="img2" src="img/icon_dz.png"/><span>' + content[i].fabulousNum + '</span><img class="img2" src="img/icon_sc.png"/><span>' + content[i].collectionNum + '</span></dd>'
		ss += '</dl></div>'
	}
	$('#search_mian').html(ss);
}
//团队数据渲染
function jiegou1(content) {
	var ss = '';
	for(var i = 0; i < content.length; i++) {
		ss += '<div class="searchteam_xq" data-id="' + content[i].teamId + '">'
		ss += '<img class="img1" src="' + content[i].image + '"/>'
		ss += '<dl class="dl_xq">'
		ss += '<dt>' + content[i].name + '</dt>'
		ss += '<dd class="timer"><img src="img/icon_sj.png"/><span>' + content[i].createdTime + '</span></dd><dd class="timer1"><img class="img2" src="img/icon_ll.png"/><span>' + content[i].browserAmount + '</span><img class="img2" src="img/icon_dz.png"/><span>0</span><img class="img2" src="img/icon_sc.png"/><span>0</span></dd>'
		ss += '</dl></div>'
	}
	$('#search_mian').html(ss);
}
//点击跳转团队详情
$("#search_mian").on('click', '.searchteam_xq', function() {
	var teamId = $(this).attr('data-id')
	window.location.href = 'detail_team.html?teamId=' + teamId
})
//活动列表跳转
$("#search_mian").on('click', '.searchactive_xq', function() {
	var activeId = $(this).attr('data-id')
	window.location.href = 'detail_active.html?activeId=' + activeId
})